#ifndef _OUDEN_H
#define _OUDEN_H

//Engine component headers
#include "odn_Element.h"
#include "odn_Timing.h"
#include "odn_util_Random.h"
#include "odn_util_RGBAColor.h"
#include "odn_util_Vector3D.h"
#include "odn_gfx_Renderer.h"
#include "odn_gfx_TextureHandler.h"
#include "odn_gfx_Vertex.h"
#include "odn_gfx_Triangle.h"
#include "odn_gfx_Mesh.h"
#include "odn_inp_Input.h"
#include "odn_inp_InputReceiver.h"
#include "odn_scene_Scene.h"
#include "odn_scene_SceneElement.h"
#include "odn_phys_PhysicsModel.h"
#include "odn_phys_Point.h"
#include "odn_phys_Collider.h"
#include "odn_phys_Bone.h"
#include "odn_scene_Skeleton.h"
#include "odn_scene_SkeletalAnimation.h"
#include "odn_file_Reader.h"

//TODO: Add all here 

//Standard library headers
#include <vector>

//Main todos 


//Main engine namespace
namespace ouden
{
	
	//Engine components
	namespace utility		{}
	namespace gfx			{}
	namespace input			{}
	namespace gui			{}
	namespace physics		{}
	namespace particles		{}
	namespace scene			{}
	namespace game			{}
	
	//Engine class
	class ODN_Engine : public ODN_Element
	{
		
	public:
		
		//Singleton instance function
		static ODN_Engine* Instance()
		{
			static ODN_Engine e;
			return &e;
		}
		
		
		//Initialise the engine with renderer settings 
		bool Init(char* Title, int Width, int Height, int BitsPerPixel, bool Fullscreen);
		
		//Run the main loop 
		void Run();
		
		//Updates and draws all of the scenes in the engine 
		bool Update();
		
		//Engine components access functions 
		scene::ODN_Scene* 				getScene()			{ return &scene; }
		gfx::ODN_Renderer* 				getRenderer()		{ return &renderer; }
		input::ODN_InputManager* 		getInputManager()	{ return &inputmanager; }
		ODN_TimeManager*				getTimeManager()	{ return &timemanager; }
		//network::ODN_NetworkManager* 	getNetworkManager()	{ return &networkmanager; }
		
		
	private:
		
		ODN_Engine()
		{
			
		}
		
		~ODN_Engine()
		{
			
		}
		
		//Engine components
		scene::ODN_Scene		scene;
		gfx::ODN_Renderer 		renderer;
		input::ODN_InputManager	inputmanager;
		ODN_TimeManager			timemanager;
		//network::ODN_NetworkManager 	networkmanager;
		
		
	};
	
	//Return the singleton instance of the engine
	ODN_Engine* getEngine();
	
}

#endif //_OUDEN_H
